package kr.hkit.powerjava.chapter07.work;

class Date{
	int year, month, day;
	
	public Date(){
		
	}

	public Date(int year, int month, int day) {
		super();
		this.year = year;
		this.month = month;
		this.day = day;
	}

	public void setdate(int year, int month, int day) {
		
		this.year = year;
		this.month = month;
		this.day = day;
		
	}


	void print1() {
		System.out.println(year+" , " + month +" , "+ day+" , ");
		
		
	}
	void print2() {
		
	 String sMonth = null;
	  switch(this.month){
	  case 1 : 
	   sMonth = "January";
	   break;
	  case 2 : 
	   sMonth = "Febuary";
	   break;
	  case 3 : 
	   sMonth = "March";
	   break;
	  case 4 : 
	   sMonth = "April";
	   break;
	  case 5 : 
	   sMonth = "May";
	   break;
	  case 6 : 
	   sMonth = "June";
	   break;
	  case 7 : 
	   sMonth = "July";
	   break;
	  case 8 : 
	   sMonth = "Agguset";
	   break;
	  case 9 : 
	   sMonth = "September";
	   break;
	  case 10 : 
	   sMonth = "October";
	   break;
	  case 11 : 
	   sMonth = "November";
	   break;
	  case 12 : 
	   sMonth = "December";
	   break;
	  }
	  System.out.println(sMonth+","+month+","+year);

	 }
	
}


public class Prog2 {
	
	public static void main(String[] args) {
		Date d=new Date();
		d.setdate(2014, 9, 18);
		d.print1();
		d.print2();
	}

}
